<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>no.priv.bang.modeler</groupId>
    <artifactId>modeler.configuration</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <name>modeler :: parent</name>
    <description>modeler tycho configuration</description>

    <prerequisites>
        <maven>3.0</maven>
    </prerequisites>

    <properties>
        <java.version>1.8</java.version>
        <maven.version>3.0</maven.version>
        <tycho.version>1.4.0</tycho.version>
        <tycho.test.jvmArgs>-Xmx512m -XX:MaxPermSize=256m</tycho.test.jvmArgs>
    </properties>

    <repositories>
        <repository>
            <id>kepler</id>
            <layout>p2</layout>
            <url>http://download.eclipse.org/releases/kepler</url>
        </repository>
        <repository>
            <id>2019-06</id>
            <layout>p2</layout>
            <url>https://download.eclipse.org/releases/2019-06</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>sonatype-public</id>
            <url>http://repository.sonatype.org/content/groups/sonatype-public-grid</url>
        </pluginRepository>
    </pluginRepositories>


    <build>
        <plugins>
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-maven-plugin</artifactId>
                <version>${tycho.version}</version>
                <extensions>true</extensions>
            </plugin>
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>target-platform-configuration</artifactId>
                <version>${tycho.version}</version>
                <configuration>
                    <resolver>p2</resolver>
                    <pomDependencies>consider</pomDependencies>
                    <ignoreTychoRepositories>true</ignoreTychoRepositories>
                    <target>
                        <artifact>
                            <groupId>no.priv.bang.modeler</groupId>
                            <artifactId>modeler.target</artifactId>
                            <version>${project.version}</version>
                        </artifact>
                    </target>
                    <environments>
                        <environment>
                            <os>win32</os>
                            <ws>win32</ws>
                            <arch>x86_64</arch>
                        </environment>
                        <environment>
                            <os>linux</os>
                            <ws>gtk</ws>
                            <arch>x86_64</arch>
                        </environment>
                    </environments>
                </configuration>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>tycho-packaging-plugin</artifactId>
                    <version>${tycho.version}</version>
                    <configuration>
                        <format>yyyyMMdd-HHmm</format>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>tycho-surefire-plugin</artifactId>
                    <version>${tycho.version}</version>
                    <configuration>
                        <useUIHarness>true</useUIHarness>
                        <includes>
                            <include>**/*Test.java</include>
                        </includes>
                        <argLine>${tycho.test.jvmArgs}</argLine>
                        <!-- kill test JVM if tests take more than 1 minute (60 seconds) to finish -->
                        <forkedProcessTimeoutInSeconds>60</forkedProcessTimeoutInSeconds>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.3</version>
                </plugin>
                <plugin>
                    <!-- This setting affects all non-tycho projects. -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
